package com.example.nexus;

import com.example.service.ExpRequestNumberService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class BasicController {
    private Logger logger = LoggerFactory.getLogger(BasicController.class);
    @Autowired
    private ExpRequestNumberService expRequestNumberService;


    private static String segment = "SRNO";
    private static String param1 = "01";
    private static String param2 = "";
    private static String param3 = "";
    @RequestMapping("/hello")
    @ResponseBody
    public String hello() {
        String result = this.expRequestNumberService.createNumber(segment, param1, param2, param3);
        logger.info("编号：" + result);
        logger.error("编号：" + result);
        logger.debug("编号：" + result);
        return  "编号：" + result;
    }
}
